/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package manager;

import entity.User;
import iface.IManager;
import java.util.ArrayList;

/**
 *
 * @author User
 */
public class UserManager implements IManager<User> {

    private Manager manager;
    private ArrayList<User> userList;

    public UserManager() {
        userList = new ArrayList<User>();
    }

    @Override
    public void add(User obj) {
        this.userList.add(obj);
    }

    @Override
    public void remove(User obj) {
        this.userList.remove(obj);
        obj.setStatus(false);
        this.manager.getDisabledUserManager().add(obj);
    }

    @Override
    public User replace(int index, User obj) {
        return this.userList.set(index, obj);
    }

    @Override
    public int size() {
        return this.userList.size();
    }

    @Override
    public User get(int index) {
        return this.get(index);
    }
}
